<?php
class SessionFilter extends CFilter{

    public function preFilter($filterChain){
        if(!Yii::app()->user->isGuest
        ){
            return true;
        }
        header('Location:index.php');
    }

}